home *** CD-ROM | disk | FTP | other *** search
/ Software of the Month Club 1995 March / SOFM_Mar1995.bin / mac / General Interest / KeyQuencer 1.2.1 / Developer’s toolkit / Extension code / Extension.c < prev    next >
C/C++ Source or Header  |  1994-11-23  |  1KB  |  52 lines

  1. //==============================================================================
  2. // KEYQUENCER EXTENSIONS MAIN DISPATCHER - VERSION 1.2.1 - NOVEMBER 1994
  3. // ⌐1994 Alessandro Levi Montalcini <LMontalcini@pmn.it>
  4. // Don╒t forget to send me any cool extensions you create!
  5. // This text looks best in monaco 9 font, 4 spaces per tab, no wrapping
  6. //
  7. // DOCUMENTATION IS AVAILABLE IN THE EXTENSION.H AND ACTION.H HEADERS
  8.  
  9. #include "A4Globals.h"
  10. #include "Extension.h"
  11. #include "Action.h"
  12.  
  13. //==============================================================================
  14. // MAIN ENTRY POINT AND MESSAGE DISPATCHER
  15.  
  16. pascal short main(long message, ParamsPtr params, MachineHandle mac, GluePtr glue)
  17. {
  18.     long    world;
  19.     short    error;
  20.     
  21.     MAIN_SETUP_GLOBALS(world);
  22.     switch(message)
  23.     {
  24.         case kExtMessageRun:
  25.             error = run(params, mac, glue);
  26.             break;
  27.         case kExtMessageInit:
  28.             error = init(mac, glue);
  29.             break;
  30.     }
  31.     MAIN_RESTORE_GLOBALS(world);
  32.     return error;
  33. }
  34.  
  35. //==============================================================================
  36. // GLOBAL STORAGE FOR TRAP PATCHES AND CALLBACKS (see Action.h)
  37.  
  38. long SetupExtensionWorld(void)
  39. {
  40.     long    world;
  41.     
  42.     TEMP_SETUP_GLOBALS(world);
  43.     return world;
  44. }
  45.  
  46. void RestoreExtensionWorld(long world)
  47. {
  48.     TEMP_RESTORE_GLOBALS(world);
  49. }
  50.  
  51. //==============================================================================
  52.